package com.xxin.module.pojo.entity;

import com.mybatisflex.annotation.Table;
import com.xxin.module.pojo.BaseEntity;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;


import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.EqualsAndHashCode;

/**
 * 订单表 实体类。
 *
 * @author lvjx
 * @since 2024-09-05
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@Table("oms_order")
@Schema(description = "oms订单实体")
public class OmsOrder extends BaseEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 用户ID(对应用户表主键ID)
     */
    @Schema(description = "用户主键id")
    private Long userId;

    /**
     * 订单编号
     */
    @Schema(description = "订单编号")
    private String orderNo;

    /**
     * 订单总金额合计
     */
    @Schema(description = "订单总金额合计")
    private BigDecimal totalMoney;

    /**
     * 实付金额合计
     */
    @Schema(description = "实付金额合计")
    private BigDecimal payMoney;

    /**
     * 数量合计
     */
    @Schema(description = "数量合计")
    private Long totalNum;

    /**
     * 支付方式：0->在线支付；1->货到付款
     */
    @Schema(description = "支付方式：0->在线支付；1->货到付款")
    private Integer payType;

    /**
     * 订单状态：0->待付款；1->待发货；2->已发货；3->已完成；4->已关闭；5->超时
     */
    @Schema(description = "订单状态：0->待付款；1->待发货；2->已发货；3->已完成；4->已关闭；5->超时")
    private Integer orderStatus;

    /**
     * 支付状态：0->未支付；1->支付成功；2->支付失败
     */
    @Schema(description = "支付状态: 0->未支付；1->支付成功; 2->支付失败")
    private Integer payStatus;

    /**
     * 支付时间
     */
    @Schema(description = "支付时间")
    private LocalDateTime payTime;

    /**
     * 收件人名称
     */
    private String receiverName;

    /**
     * 收件人电话
     */
    private String receiverPhone;

    /**
     * 收件人地址
     */
    private String receiverAddress;

    /**
     * 订单过期时间
     */
    private LocalDateTime expirationTime;

}
